
$(document).ready(function(){
	$("#menu_sys").hide();
	var status = $("#status").val();
	if(status!="1"){
		$("#system").click(function(){
			alert("您没有访问系统管理的权限！");
		});
	}else{
		$("#system").click(function(){
			$("#tree_icon").css("background","url(main/home/images/main_121.gif)");
			$("#menu_list").hide();
			$("#menu_sys").show();
			$(window.parent.mainFrame.document.getElementById("menuSon")).html("");
			$(window.parent.mainFrame.document.getElementById("menuFather")).html("系统管理");
			
		});
	}
	$("#yh").click(function(){
		$("#tree_icon").css("background","url(main/home/images/main_12.gif)");
		$("#menu_sys").hide();
		$("#menu_list").show();
		$(window.parent.mainFrame.document.getElementById("menuSon")).html("");
		$(window.parent.mainFrame.document.getElementById("menuFather")).html("用户信息");
		
	});
	

	$('#menu_list a').click(function(){
		var moduleId = $(this).attr("id");
		window.parent.right.location.href='../RMS/moduleAuth?moduleId='+moduleId;
		$(window.parent.mainFrame.document.getElementById("menuSon")).html(" → "+$(this).html());
	});
	
	$('#menu_sys a').click(function(){
		//parent.right.document.getElementById('content').value = '' ;
		//var content = parent.right.document.getElementById('content');
		//var content = self.parent.frames['right'];
		//alert(content.html());
		var table = parent.right.document.getElementById('rightTable');
		//$(v).hide();
		var str = $(this).attr('id');
		
		//$('#content').load("../RMS/main/"+str+"/list");
		$(table).hide();
		window.parent.right.location.href='../RMS/main/'+str+'/list'
		$(window.parent.mainFrame.document.getElementById("menuSon")).html(" → "+$(this).html());
		//$(content).load("../RMS/main/"+str+"/list");
		//alert(window.parent.left.document.URL);
		//$(window.parent.right.document.getElementsByTagName("body")).load("../RMS/main/"+str+"/list",function(response,status,xhr){
			
			//alert(response);
			
			//alert(xhr.document);
			//window.parent.right.location.href = "";
		//});
		//alert("../RMS/"+str+"/list");
	});
	
	
	//alert(v);
	
});
